package cn.edu.scau.cmi.chenjiale.factory.third;

import cn.edu.scau.cmi.chenjiale.factory.type.BodyInjure;
import cn.edu.scau.cmi.chenjiale.factory.type.CarDestroy;
import cn.edu.scau.cmi.chenjiale.factory.type.Insurance;
import cn.edu.scau.cmi.chenjiale.factory.type.InsuranceType;
import cn.edu.scau.cmi.chenjiale.factory.type.MultiAccident;
import cn.edu.scau.cmi.chenjiale.factory.type.PersonInjure;

/**
 * 平安保险工厂类
 * 
 * @author chen.jiale
 *
 */
public class PingAnInsuranceFactory extends InsuranceFactory {

	@Override
	public Insurance getInsurance(String type) {
		Insurance insurance = null;
		if (InsuranceType.BODY_INJURE_CN.equals(type)) {
			insurance = new BodyInjure();
		}
		if (InsuranceType.CAR_DESTROY_CN.equals(type)) {
			insurance = new CarDestroy();
		}
		if (InsuranceType.PERSON_INJURE_CN.equals(type)) {
			insurance = new PersonInjure();
		}
		if (InsuranceType.MULTI_ACCIDENT_CN.equals(type)) {
			insurance = new MultiAccident();
		}
		return insurance;
	}

}
